<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
       <p>原字符串：{{ msg }}</p>
       <p>反转字符串：{{ reverseMsg }}</p>
    </div>
</body>
<script>
    var appCom = {
        data(){
            return {
                msg:"Hello,computed!"
            }
        },
        computed:{
            reverseMsg:function(){
                return this.msg.split('').reverse().join('')
            }
      }
    };
    const app = Vue.createApp(appCom).mount('#app')
</script>
</html>